package com.example.leetcode;

public class TwoNumSum {
    public static int[] twoSum(int[] nums, int target) {
        int[] index = new int[2];
        int a1 = 0;
        int b1 = 0;
        for (int i = 0; i < nums.length; i++) {
            int a=nums[i];
            for (int j = 0; j < nums.length; j++) {
                int b=nums[j];
                if ((nums[i] + nums[j]) == target) {
                    a1 = i;
                    b1 = j;
                }
            }
        }
        System.out.println(a1+"===="+b1);
        return null;
    }

    public static void main(String[] args) {

        int[] nums = new int[]{15, 7, 11, 2};
        int target = 9;
        int[] ints = TwoNumSum.twoSum(nums, target);
    }
}
